package com.exam.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.exam.entity.Interview;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author wanghuipeng
 * @date 2022/5/11
 * @apiNote
 */

@Mapper
public interface InterviewMapper  {

    @Update("update interview set status = 1,remasks = #{remasks}  where interviewId = #{interviewId}")
    int update(int interviewId,String remasks);


    @Select("select * from interview")
    List<Interview> selectAll();

    @Insert("insert into interview (interviewId,date,status,remasks,studentId,adminId) values (#{interviewId},#{date},0,#{remasks},#{studentId},#{adminId})")
    boolean save(Interview interview);
}
